home *** CD-ROM | disk | FTP | other *** search
- /* Slim_Anim
- Ce script va :
- - construire une animation de 10 images
- - faire un warp sur chaque image.
- - jouer l'animation
- */
-
- options results
- parse ARG Port b
-
- ADDRESS value Port
-
- pp_GetWidth
- width=result
-
- pp_GetHeight
- height=result
-
- IF width=0 & height=0 then DO
- pp_Warn 'Load*a*picture*first'
- EXIT
- END
-
- pp_CountFrames
- nbframe=result
- IF nbframe<2 then DO
- pp_AnimGui 0
- nbframe=result
- IF nbframe<0 then DO
- EXIT
- END
- pp_MakeAnim nbframe
- pp_CountFrames
- nbframe=result
- IF result<2 then DO
- pp_Warn "Not*enough*memory"
- EXIT
- END
- END
-
- radius=50
- pp_DialogInit 150 60 "*Slim*Anim*" 1
- pp_Integer 0 70 8 50 16 "Radius" 1 radius
- pp_Dialog
- rc=result
- IF rc=0 then DO
- EXIT
- END
-
- pp_GetDialog 0
- radius=result
-
- do i=1 to nbframe
- pp_SetJiffies i 2
- do z=0 to width by radius
- do zz=0 to height by radius
- Dx=random(0,5,time('S'))
- Dy=random(0,5,time('S'))
- a=random(0,5,time('S'))
- if a>2 then
- do
- Dx=Dx*-1
- end
- a=random(0,5,time('S'))
- if a>2 then
- do
- Dy=Dy*-1
- end
- pp_Warp z zz radius Dx Dy
- end
- end
- pp_NextFrame
- end
-
- pp_PlayAnim 1
-
- EXIT
-
-